\hypertarget{class_cpp_web_server}{}\section{Cpp\+Web\+Server Class Reference}
\label{class_cpp_web_server}\index{Cpp\+Web\+Server@{Cpp\+Web\+Server}}


The \hyperlink{class_cpp_web_server}{Cpp\+Web\+Server} class is a H\+T\+TP server, responsable to receive and dispatch the requisitions.  




{\ttfamily \#include $<$cppwebserver.\+h$>$}



Inheritance diagram for Cpp\+Web\+Server\+:
% FIG 0
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_cpp_web_server_a9c5598c541de45a40d2ebad698e9a616}{Cpp\+Web\+Server} (const \hyperlink{class_configuration}{Configuration} \&configuration, \hyperlink{class_filter}{Filter} $\ast$filter=nullptr)
\begin{DoxyCompactList}\small\item\em Load S\+SL configuration, configure the thread pool and the filter. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_cpp_web_server_a6b9d6874d16f6491c511fb4b8793a5f8}\label{class_cpp_web_server_a6b9d6874d16f6491c511fb4b8793a5f8}} 
virtual \hyperlink{class_cpp_web_server_a6b9d6874d16f6491c511fb4b8793a5f8}{$\sim$\+Cpp\+Web\+Server} ()
\begin{DoxyCompactList}\small\item\em Destroys all controllers and sessions. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename C\+O\+N\+T\+R\+O\+L\+L\+ER $>$ }\\void \hyperlink{class_cpp_web_server_a3982d41728fd3237c42dd6dabbf1efb6}{add\+Controller} (const Q\+String \&url) noexcept
\begin{DoxyCompactList}\small\item\em Hitches a url to a \hyperlink{class_controller}{Controller}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_cpp_web_server_a49addc6ee3148d11134062e6b7a56791}{incoming\+Connection} (qintptr socketfd) override
\begin{DoxyCompactList}\small\item\em incoming\+Connection \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_cpp_web_server_a1e53101dea816fe425a44665a8949c4f}\label{class_cpp_web_server_a1e53101dea816fe425a44665a8949c4f}} 
void \hyperlink{class_cpp_web_server_a1e53101dea816fe425a44665a8949c4f}{do\+Clean} ()
\begin{DoxyCompactList}\small\item\em Clean expired sessions on Server. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \hyperlink{class_cpp_web_server}{Cpp\+Web\+Server} class is a H\+T\+TP server, responsable to receive and dispatch the requisitions. 

\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_cpp_web_server_a9c5598c541de45a40d2ebad698e9a616}\label{class_cpp_web_server_a9c5598c541de45a40d2ebad698e9a616}} 
\index{Cpp\+Web\+Server@{Cpp\+Web\+Server}!Cpp\+Web\+Server@{Cpp\+Web\+Server}}
\index{Cpp\+Web\+Server@{Cpp\+Web\+Server}!Cpp\+Web\+Server@{Cpp\+Web\+Server}}
\subsubsection{\texorpdfstring{Cpp\+Web\+Server()}{CppWebServer()}}
{\footnotesize\ttfamily C\+W\+F\+\_\+\+B\+E\+G\+I\+N\+\_\+\+N\+A\+M\+E\+S\+P\+A\+CE Cpp\+Web\+Server\+::\+Cpp\+Web\+Server (\begin{DoxyParamCaption}\item[{const \hyperlink{class_configuration}{Configuration} \&}]{configuration,  }\item[{\hyperlink{class_filter}{Filter} $\ast$}]{filter = {\ttfamily nullptr} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}



Load S\+SL configuration, configure the thread pool and the filter. 


\begin{DoxyParams}{Parameters}
{\em \hyperlink{class_filter}{Filter}} & $\ast$filter \+: Install a filter for requests on the server. Optional. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_cpp_web_server_a3982d41728fd3237c42dd6dabbf1efb6}\label{class_cpp_web_server_a3982d41728fd3237c42dd6dabbf1efb6}} 
\index{Cpp\+Web\+Server@{Cpp\+Web\+Server}!add\+Controller@{add\+Controller}}
\index{add\+Controller@{add\+Controller}!Cpp\+Web\+Server@{Cpp\+Web\+Server}}
\subsubsection{\texorpdfstring{add\+Controller()}{addController()}}
{\footnotesize\ttfamily template$<$typename C\+O\+N\+T\+R\+O\+L\+L\+ER $>$ \\
void Cpp\+Web\+Server\+::add\+Controller (\begin{DoxyParamCaption}\item[{const Q\+String \&}]{url }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Hitches a url to a \hyperlink{class_controller}{Controller}. 


\begin{DoxyParams}{Parameters}
{\em const} & Q\+String \&url \+: Url name. it will not be possible to map the controllers through the add\+Controller function, instead everything should be handled inside the \hyperlink{class_filter}{Filter}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_cpp_web_server_a49addc6ee3148d11134062e6b7a56791}\label{class_cpp_web_server_a49addc6ee3148d11134062e6b7a56791}} 
\index{Cpp\+Web\+Server@{Cpp\+Web\+Server}!incoming\+Connection@{incoming\+Connection}}
\index{incoming\+Connection@{incoming\+Connection}!Cpp\+Web\+Server@{Cpp\+Web\+Server}}
\subsubsection{\texorpdfstring{incoming\+Connection()}{incomingConnection()}}
{\footnotesize\ttfamily void Cpp\+Web\+Server\+::incoming\+Connection (\begin{DoxyParamCaption}\item[{qintptr}]{socketfd }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [protected]}}



incoming\+Connection 


\begin{DoxyParams}{Parameters}
{\em qintptr} & socketfd \+: Socket descriptor. \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
/home/herik/\+C\+P\+P\+Web\+Framework/\+C\+P\+P\+Web\+Framework/cwf/cppwebserver.\+h\item 
/home/herik/\+C\+P\+P\+Web\+Framework/\+C\+P\+P\+Web\+Framework/cwf/cppwebserver.\+cpp\end{DoxyCompactItemize}
